$PBExportHeader$a1.sra
$PBExportComments$Export By Shu<KenShu@163.net>
forward
global type a1 from application
end type

global transaction sqlca
global dynamicdescriptionarea sqlda
global dynamicstagingarea sqlsa
global error error
global message message
end forward

global variables
winsock wsk
powerobject gpo_null
boolean b_tcp_active=FALSE
pbhostent hetmp
end variables

global type a1 from application

end type
global a1 a1

type prototypes
Public Function long IniCom (long comport,long baudrate) LIBRARY "SmartCom411SFJ.dll"
Public Function long CloseCom (long comport) LIBRARY "SmartCom411SFJ.dll"
Public Function long ReadPersonalInfo (long comport,string name,string buffer) LIBRARY "SmartCom411SFJ.dll"
Public Function long ReadCardInfo (long comport,string cardnum,string cardnum1,blob cardid,blob cardtype,blob expireday) LIBRARY "SmartCom411SFJ.dll"
Public Function long ReadCard (long comport,string cardnum,string cardnum1,blob password,blob cardid,string name,blob money) LIBRARY "SmartCom411SFJ.dll"
Public Function long ReadCardBeep (long comport,string cardnum,string cardnum1,blob password,blob cardid,string name,blob money) LIBRARY "SmartCom411SFJ.dll"
Public Function long DecCard (long comport,string cardnum,blob decmoney) LIBRARY "SmartCom411SFJ.dll"
Public Function long Display (long comport,string xsbuffer,long delaytime) LIBRARY "SmartCom411SFJ.dll"
Public Function long DisplayMoney (long comport,long money) LIBRARY "SmartCom411SFJ.dll"
Public Function long ReadLiberyNum (long comport,string thirdinfo) LIBRARY "SmartCom411SFJ.dll"

end prototypes

event close;//close (none) returns (none)


DESTROY wsk

end event

on a1.create
//create (none) returns (none)


THIS.appname = "a1"
message = CREATE message
sqlca = CREATE transaction
sqlda = CREATE dynamicdescriptionarea
sqlsa = CREATE dynamicstagingarea
error = CREATE error

end on

on a1.destroy
//destroy (none) returns (none)


DESTROY sqlca
DESTROY sqlda
DESTROY sqlsa
DESTROY error
DESTROY message

end on

event open;//open (string commandline) returns (none)
//string commandline


IF  NOT (isvalid(wsk)) THEN wsk = CREATE winsock
setnull(gpo_null)
open(w1)

end event

